<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
        <title>Agency</title>
        <style>
            tfoot{
                text-align: center;
            }
            thead{
                background-color: magenta;
                color: white;
            }
            td{
                font-weight: bold;
            }
            .msg{
                font-size: small;
                color: blue;
            }
        </style>
    </h:head>
     <h:body>
        <h:form>
            <h:panelGrid id="panel1" columns="2" border="1" 
                         cellpadding="5" cellspacing="1">
                <f:facet name="header">
                    <h:outputText value="Add User Information"/>
                </f:facet>
                <h:outputLabel value="First Name:"/>
                <h:inputText value="#{user.firstName}" id="fn"/>
                <h:outputLabel value="Last Name:"/>
                <h:inputText value="#{user.lastName}" id="ln"/>
                <h:outputLabel value="Address:"/>
                <h:inputText value="#{user.address}" id="adr"/>
                <h:outputLabel value="Email:"/>
                <h:inputText value="#{user.email}" id="eml"/>
                <h:outputLabel value="Username:"/>
                <h:inputText value="#{user.username}" id="urn"/>
                <f:facet name="footer">
                    <h:outputLabel value="#{user.msg}" id="msg" styleClass="msg"/>
                    <h:commandButton value="Save" action="#{user.saveUser}">
                    <f:ajax render="fn ln adr eml urn msg" execute="@form"/>
                        </h:commandButton>
                </f:facet>
            </h:panelGrid>
        </h:form>
    </h:body>
</html>
